import service from '@/utils/request'

// 用户登录
export const loginApi = (username, password) => {
  console.log('api', username, password)
  return service.post('/auth/login', {
    username,
    password
  })
}
// 除过login其他的api都需要携带token, =>
// 获取用户的信息
export const profile = () => {
  return service.get('/users/profile')
}
// 退出登录
export const loginOutApi = () => {
  return service.post('/auth/logout')
}

//...
